package router

import (
	"blog/middleware"
	_ "blog/middleware"
	"github.com/gin-gonic/gin"
)

var Router *gin.Engine

func init() {
	gin.SetMode(gin.DebugMode)

	Router = gin.Default()

	Router.Use(middleware.Cors())
	//category.ArticeController.LoadCategory(router)
}

func InitRouter() {

	Router.Use(gin.Logger())

	Router.Use(gin.Recovery())

	Router.Run(":8081")
}
